package com.qf.controller;

import com.qf.dto.R;
import com.qf.pojo.Menus;
import com.qf.service.MenusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/menus")
public class MenusController {
    @Autowired
    private MenusService menusService;
    @GetMapping("/menus")
    public R getMenus(){

        List<Menus> list = menusService.findAllMenus();
        R r = R.setOk(list);
        return r;
}

}
